<script type="text/javascript" src="/js/jsAddress.js"></script>
<script>
	$(function(){
		$("#shop_id").combobox({    
		    url: '/shop/combobox',    
		    required: true,
		    valueField:'id',
    		textField:'name',
		    width:250,
		    onSelect: function(rec){    
		    	$('#customer_id').combobox('clear');
	            var url = '/customer/combobox/'+rec.id;
	            $('#customer_id').combobox('reload', url);
	        }
		}); 
		$('#customer_id').combobox({
			url: '/customer/combobox/${(po.shop_id)!0}',
			valueField:'id',    
    		textField:'username',
    		required: true
		});
		addressInit("prov","city","area","广东","深圳市","南山区");
		
		var def_add='${(po.def_addr)!0}';
		$("input[name='customerAddress.def_addr']").eq(def_add).attr("checked",'checked');
	})
</script>
<form method="post" id="editForm" name="editForm">
	<input type="hidden" name="customerAddress.id" value="${(po.id)!}" id="poid">
	<div id="tt" class="easyui-tabs" style="width: 786px; height: 450px;">
		<div title="会员地址" style="padding: 5px;">
			<table class="tableForm tableCss">
				<tr>
					<th><font color=red>*</font>商户</th>
					<td colspan="3">
						 <input id="shop_id" name="customerAddress.shop_id" value="${(po.shop_id)!}"> 
					</td>
				</tr>
				<tr>
					<th><font color=red>*</font>用户</th>
					<td colspan="3">
						<input id="customer_id" name="customerAddress.customer_id" value="${(po.customer_id)!}"/>
					</td>
				</tr>
				<tr>
					<th><font color=red>*</font>地址别名</th>
					<td colspan="3">
						<input id="customerAddress_id" name="customerAddress.alias" value="${(po.alias)!}" class="easyui-validatebox" data-options="required:true"/>
					</td>
				</tr>
				<tr>
					<th><font color=red>*</font>所在地区</th>
					<td colspan="3">
					<select id="prov" name="customerAddress.prov"></select>
					<select id="city" name="customerAddress.city"></select>
					<select id="area" name="customerAddress.area"></select>
					</td>
				</tr>
				<tr>
					<th><font color=red>*</font>详细地址</th>
					<td colspan="3">
						<input id="address" name="customerAddress.address" style="width:250px"
						 value="${(po.address)!}" class="easyui-validatebox" data-options="required:true"/>
					</td>
				</tr>
				<tr>
					<th><font color=red>*</font>邮编</th>
					<td>
						<input id="code" name="customerAddress.code" value="${(po.code)!}" class="easyui-validatebox" data-options="required:true"/>
					</td>
					<th>是否默认地址</th>
					<td>
						否  <input type="radio" value="0" name="customerAddress.def_addr" checked/>
						是  <input type="radio" value="1" name="customerAddress.def_addr"/>
					</td>
				</tr>
				<tr>
					<th><font color=red>*</font>收货人</th>
					<td><input type="text" name="customerAddress.consignee" class="easyui-validatebox"
						value="${(po.consignee)!}" data-options="required:true"></td>
					<th><font color=red>*</font>手机号</th>
					<td><input type="text" name="customerAddress.phone" class="easyui-validatebox"
						value="${(po.phone)!}" data-options="required:true"></td>
				</tr>
			</table>
		</div>
	</div>
</form>